{% extends "mall/base.html" %}

{% block title %}
{% endblock %}

{% block css %}
    <style>
        #qr-code {
            width: 400px;
            height: 400px;
            margin: 6% auto 0;
            text-align: center;
        }
    </style>
{% endblock %}

{% block header %}
    {% include 'component/pad-suspend.html' %}
{% endblock %}

{% block content %}
    <input type="hidden" name="device_id" value="{{ open_id }}">
    <div>
        {% if address.sdef_address_phone %}
            <div id="qr-code">
            </div>
            <p style="text-align: center;font-size: 25px;" id="msg">用微信扫码支付</p>
        {% else %}
            <div class="u-checkout-pay checkout-pay">
                <div class="pay-content J-pay-content border-t">
                    <div class="address-tips" style="margin-top: 100px;">您还未设置收货地址，请先<a
                            href="javascript:"
                            class="set-address">设置收货地址</a>
                    </div>
                </div>
            </div>
        {% endif %}

    </div>
{% endblock %}

{% block footer %}
{% endblock %}

{% block js %}
    <script src="{{ STATIC_URL }}/static/lib/jquery.qrcode.js"></script>
    <script>
        var URL = {
            logo_src: "{{ STATIC_URL }}/static/img/wechat.png"
        };
        var session_id = "{{open_id}}";
        var topic_id = "{{ open_id }}";
    </script>
    <script src="{{ STATIC_URL }}/static/js/pad_mall/pay-confirm.js?v={{ version_code }}"></script>
{% endblock %}